﻿﻿﻿﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common/INC/noCache.jsp"%>
<%@page import="com.seeyon.v3x.exchange.util.Constants"%>
<%@page import="com.seeyon.v3x.edoc.manager.EdocSwitchHelper"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@ include file="edocHeader.jsp"%> 
<%@ include file="../doc/pigeonholeHeader.jsp" %>
<%@ include file="../common/INC/noCache.jsp"%>
<title><fmt:message key="common.page.title${v3x:suffix()}" bundle="${v3xCommonI18N}" /></title>
<%@page import="com.seeyon.v3x.common.constants.ApplicationCategoryEnum" %>
<link rel="stylesheet" type="text/css" href="<c:url value="/common/jquery/themes/default/easyui.css${v3x:resSuffix()}" />" />
<script type="text/javascript" charset="UTF-8" src="<c:url value="/common/jquery/jquery.js${v3x:resSuffix()}" />"></script>
<script type="text/javascript" charset="UTF-8" src="<c:url value="/common/jquery/jquery.plugin.js${v3x:resSuffix()}" />"></script>
<script type="text/javascript" charset="UTF-8" src="<c:url value="/common/jquery/jquery.easyui.js${v3x:resSuffix()}" />"></script>

<script type="text/javascript" charset="UTF-8" src="<c:url value="/apps_res/v3xmain/js/phrase.js${v3x:resSuffix()}" />"></script>
<script type="text/javascript" charset="UTF-8" src="<c:url value="/apps_res/edoc/js/edocWorkflow.js${v3x:resSuffix()}" />"></script>
<c:set var="canEditAtt" value="${allowUpdateAttachment &&  param.from=='sended' && !summary.finished}"/>
<c:set value="${v3x:currentUser().id}" var="currentUserId"/>
<c:set value="${param.from eq 'Pending' && affair.state eq 3}" var="hasSignButton"/>
<v3x:selectPeople id="flash" panels="Department,Team" selectType="Department,Team,Member"
                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
                  jsFunction="monitorFrame.dataToFlash(elements)" viewPage="selectNode4Workflow"/>
                  
<fmt:message key='common.toolbar.print.label' bundle='${v3xCommonI18N}' var="printLabel"/>
<fmt:message key="common.attribute.label" bundle="${v3xCommonI18N}" var="attributeLabel" />
<fmt:message key='flow.node.excute.detail' bundle="${colI18N}" var="excuteDetailLabel" />  
<c:set var="isOfficeBodyType" value="${'OfficeWord' eq summary.firstBody.contentType or 'OfficeExcel' eq summary.firstBody.contentType}"/>

<script>
<!--
	var summaryId="${param.summaryId}";

	//office插件复制粘贴控制 -- 当前正文是否允许编辑
	var canEdit="${v3x:containInCollection(advancedActions, 'Edit') or v3x:containInCollection(commonActions, 'Edit')}";
	var appTypeName="${appTypeName}"; 
	var hasDiagram = "${hasDiagram}";
	var currentNodeId = "${currentNodeId}";
	var showMode = 0;
	var showHastenButton = "${showHastenButton}";
	var isNewCollaboration = "${isNewCollaboration}";
	var isTemplete = false;
	var isCheckTemplete = false;
	var templateFlag = "${templateFlag}";
	var summary_id = "${param.summaryId}";
	var transmitSendNewEdocId="${transmitSendNewEdocId}";
	var isEdocCreateRole="${isEdocCreateRole}";
	var affair_id = "${param.affairId}";
	var hasPrepigeonholePath="${hasSetPigeonholePath}";
	var sendUserDepartmentId="${edocSendMember.orgDepartmentId}";
	var sendUserAccountId="${edocSendMember.orgAccountId}";
	var caseId = "${caseId }";
	var processId = "${processId }";
	var showOriginalElement_colAssign=false;
	//异步加载流程信息
	var isLoadProcessXML = false;
	var caseProcessXML = "";
	var caseLogXML = "";
	var caseWorkItemLogXML = "";
	var clickClose = false;
	

	var divPhraseDisplay = 'none';
	var onlySeeContent ='${onlySeeContent}';
	var phraseURL = '<html:link renderURL="/phrase.do?method=list" />';
	var hasSign=${v3x:containInCollection(commonActions, 'Sign') || v3x:containInCollection(advancedActions, 'Sign')};
	var permKey="${nodePermissionPolicyKey}";
	var formAction="<html:link renderURL='/edocController.do?method=finishWorkItem' />";

	var taohongSendUnitType = 1;
	//分支 开始
	//分支
	var branchs = new Array();
	var team = new Array();
	var secondpost = new Array();
	var startTeam = new Array();
	var startSecondpost = new Array();
	<c:if test="${branchs != null}">
		var handworkCondition = _('edocLang.handworkCondition');
		<c:forEach items="${branchs}" var="branch" varStatus="status">
			var branch = new ColBranch();
			branch.id = ${branch.id};
			branch.conditionType = "${branch.conditionType}";
			branch.formCondition = "${v3x:escapeJavascript(branch.formCondition)}";
			branch.conditionTitle = "${v3x:escapeJavascript(branch.conditionTitle)}";		
			branch.conditionDesc = "${v3x:escapeJavascript(branch.conditionDesc)}";
			branch.isForce = "${branch.isForce}";
			eval("branchs["+${branch.linkId}+"]=branch");
		</c:forEach>
	</c:if>
	<c:if test="${teams != null}">
		<c:forEach items="${teams}" var="team">
			team["${team.id}"] = ${team.id};
		</c:forEach>
	</c:if>
	<c:if test="${secondPosts != null}">
		<c:forEach items="${secondPosts}" var="secondPost">
			secondpost["${secondPost.depId}_${secondPost.postId}"] = "${secondPost.depId}_${secondPost.postId}";
		</c:forEach>
	</c:if>
	<c:if test="${startTeams != null}">
		<c:forEach items="${startTeams}" var="startTeam">
			startTeam["${startTeam.id}"] = "${startTeam.id}";
		</c:forEach>
	</c:if>
	<c:if test="${startSecondPosts != null}">
		<c:forEach items="${startSecondPosts}" var="startSecondPost">
			startSecondpost["${startSecondPost.depId}_${startSecondPost.postId}"] = "${startSecondPost.depId}_${startSecondPost.postId}";
		</c:forEach>
	</c:if>
	//分支 结束
	var lineMax = 7;
	//office插件使用的JS变量
	${contentRecordId}
	var bodyType="${summary.firstBody.contentType}";
//-->
</script>

<script>
<!--
function hideLayout(){
	$('body').layout('panel','east').panel('resize',{
		width:45
	});
	var img1 = document.getElementById('img1');
	var img2 = document.getElementById('img2');
	var signAreaTable = document.getElementById('signAreaTable');
	var signMinDiv = document.getElementById('signMinDiv');
	if(img1) img1.style.display='none';
	if(img2) img2.style.display=''
	if(signMinDiv) signMinDiv.style.display=''
	$('body').layout().resize();
}
function showLayout(){
	$('body').layout('panel','east').panel('resize',{
		width:350
	});
	var img1 = document.getElementById('img1');
	var img2 = document.getElementById('img2');
	var signAreaTable = document.getElementById('signAreaTable');
	var signMinDiv = document.getElementById('signMinDiv');

	if(img1) img1.style.display='';
	if(img2) img2.style.display='none'

	if(signAreaTable) signAreaTable.style.display='';
	if(signMinDiv) signMinDiv.style.display='none'

	$('body').layout().resize();
}
function senderEditAtt(){
	var attList = getAttachment(summaryId,summaryId);
	var result = editAttachments(attList,summaryId,summaryId,'4');
	//提交
	if(result){
		saveAttachment();
		$('#attchmentForm').ajaxSubmit({
		        url : genericURL + "?method=updateAttachment&edocSummaryId="+summaryId+"&affairId="+affair_id,
		        type : 'POST',
		        success : function(data) {
			        updateAttachmentMemory(result,summaryId,summaryId,'')
					showAttachment(summaryId, 2, 'attachment2TrContent', 'attachment2NumberDivContent','attachmentHtml2Span');
					showAttachment(summaryId, 0, 'attachmentTrContent', 'attachmentNumberDivContent','attachmentHtml1Span');
					document.getElementById("attachmentTrContent").style.display='';
		 		}
		})
	}
}
function initCaseProcessXML(){
	if(isLoadProcessXML == false){
		try {
			var requestCaller = new XMLHttpRequestCaller(null, "ajaxColManager", "getXML", false, "POST");
			requestCaller.addParameter(1, "String", caseId);
			requestCaller.addParameter(2, "String", processId);
			var processXMLs = requestCaller.serviceRequest();
			
			if(processXMLs){
				caseProcessXML = processXMLs[0];
				caseLogXML = processXMLs[1];
				caseWorkItemLogXML = processXMLs[2];
				document.getElementById("process_xml").value = caseProcessXML;
				document.getElementById("process_desc_by").value = "xml";
			}
		}
		catch (ex1) {
		}
		isLoadProcessXML = true;
	}
}
function init_edocSUmmary() {
	parent.edocType="${summary.edocType}";
	var oSupervise = document.getElementById('buttonsupervis');
	if(oSupervise!=null){
		oSupervise.onclick=null;
		oSupervise.onclick=function(){
			document.getElementById('superviseIframe').src = "${edoc}?method=superviseDiagram&summaryId=${param.summaryId}&openModal=${openModal}";
		}
	}
	var buttonworkflow = document.getElementById('buttonworkflow');
	if(buttonworkflow!=null){
		buttonworkflow.onclick=null;
		buttonworkflow.onclick=function(){
			var divPhrase = document.getElementById('divPhrase');
			if(divPhrase!=null && divPhrase.style.display!='none'){
				divPhraseDisplay  = 'block';
				divPhrase.style.display='none';
			}else{
				divPhraseDisplay  = 'none';
			}
		}
	}
	var buttonsign = document.getElementById('buttonedocform');
	if(buttonsign!=null){
		buttonsign.onclick=null;
		buttonsign.onclick=function(){
			var divPhrase = document.getElementById('divPhrase');
			if(divPhrase!=null && divPhraseDisplay=='block'){
				divPhrase.style.display='block';
			}else{
				divPhrase.style.display='none';
			}
		}
	}

	var buttoncontent = document.getElementById('buttoncontent');
	if(buttoncontent!=null){
		buttoncontent.onclick=null;
		buttoncontent.onclick=function(){
			if(typeof(trans2Html)=='undefined' || trans2Html == 'false')
				LazyloadOffice('0');
		}
	}
	var buttoncontent = document.getElementById('buttoncontent1');
	if(buttoncontent!=null){
		buttoncontent.onclick=null;
		buttoncontent.onclick=function(){
			if(typeof(trans2Html)=='undefined' || trans2Html == 'false')
				LazyloadOffice('1');
		}
	}
	var buttoncontent = document.getElementById('buttoncontent2');
	if(buttoncontent!=null){
		buttoncontent.onclick=null;
		buttoncontent.onclick=function(){
			if(typeof(trans2Html)=='undefined' || trans2Html == 'false')
				LazyloadOffice('2');
		}
	}
	if(onlySeeContent=='true'){ //借阅只借阅正文的时候，切换到正文也签
		showPrecessAreaTd('content');	
	}else{
		showPrecessAreaTd('edocform');	
	}
	<c:choose>
		<c:when test="${extendConfig != 'false'}">
			showLayout()
		</c:when>
		<c:otherwise>
			hideLayout();
		</c:otherwise>
	</c:choose>

	//显示正文附件区域，由于布局的关系 ，导致在firefox下面或者两次调用这个方法，导致显示不正常。故将其移动到页面初始化方法中
	showAttachment('${summary.id}', 2, 'attachment2TrContent', 'attachment2NumberDivContent','attachmentHtml2Span');
	showAttachment('${summary.id}', 0, 'attachmentTrContent', 'attachmentNumberDivContent','attachmentHtml1Span');

	//changyi add 显示附件(开始没有附件时就不显示)
	if(theToShowAttachments){
		var attachmentNumber = 0;
		for(var i = 0; i < theToShowAttachments.size(); i++) {
			var att  = theToShowAttachments.get(i);
			if(att.subReference == '${summary.id}' && (att.type==0 || att.type==2)){
				attachmentNumber++;
			}
		}
		if(attachmentNumber > 0){
			document.getElementById("attachment2Tr").style.display="";
		}
	}
	

	
	<%--是否在已发中显示修改附件的按钮--%>
	if("${canEditAtt}" == 'true') showModifyAttachmentLabel();

	//初始化附件区，当附件太多的时候设置样式高度为2行，有滚动条
	var attDiv =document.getElementById("attDiv");
	var att2Div= document.getElementById("att2Div");
	if(attDiv) exportAttachment(attDiv);
	if(att2Div) exportAttachment(att2Div);

	//这个地方不要随便动啊。防止OFfice正文加载两次，同时正确显示HTML正文
	if( bodyType=="HTML"){
		$('#scrollContentTd').html($('#ctn').html());
	}

	
}
<%--是否在已发中显示修改附件的按钮--%>
function showModifyAttachmentLabel(){
	var attachmentTr=document.getElementById("attachmentTrContent");
	if(attachmentTr)attachmentTr.style.display="";
	var normalText=document.getElementById("normalText");
	if(normalText)normalText.style.display="none";
	var uploadAttachmentTR=document.getElementById("uploadAttachmentTR");
	if(uploadAttachmentTR)uploadAttachmentTR.style.display="";
}

function unLoad(processId, summaryId,userId){
	try{
    	colDelLock(processId, summaryId,userId);
    	unlockEdocEditForm(summaryId,userId);
    	unlockHtmlContent(summaryId);
    }catch(e){
    }
}
function updateContent(summaryId){
  modifyBody(summaryId,hasSign);
}
function htmlSign(){
	showPrecessAreaTd("edocform");
	contentIframe.handWrite(theform.summary_id.value,theform.disPosition.value);
}

function edocSubmitForm(subForm,summaryId){
	//lijl添加,状态是是3或者4并且是退回过的情况下弹出窗口-----------------------Start
	var optionType=document.getElementById("optionType").value;
	var optionId=document.getElementById("optionId").value;
	var affairState=document.getElementById("affairState").value;
	var summary_id=document.getElementById("summary_id").value;
	var affState=document.getElementById("affState").value;
	var edocType = "${summary.edocType}";

	saveCardInfo(edocType,summary_id);
	
	//太原市政府二开  上卡功能  郝后成  2012-07-25
	var formId = window.frames["contentIframe"].document.getElementById("edoctable").value;
	//节点类型(shenpi、huitui...)
	var policy=document.getElementById("policy").value;
	var signFlag = true;
	//封发节点签章判断
	if(permKey == "fengfa") {
		var bodyType = document.getElementById("bodyType").value;
		if(bodyType == "OfficeWord" && ${summary.firstBody.contentType=='OfficeWord'}) {
			signFlag = checkIsHaveHtmlSign('${firstBodyContent}'); //这方法明明要传递id->传的是office正文的content
		}
	}
	if((optionType=='3' || optionType=='4') && (affairState=='6' || (affairState=='3' && affState=='13'))){
		var winWidth = 400;
		var winHeight = 350;
		var feacture = "dialogWidth:" + winWidth + "px; dialogHeight:" + winHeight + "px;";
		feacture = feacture + "directories:no; localtion:no; menubar:no; status:no;";
		feacture = feacture + "toolbar:no; scroll:no; resizeable:no; help:no";
		var url = genericURL+"?method=optionSetup&optionId="+optionId+"&optionType="+optionType+"&summary_id="+summary_id+"&policy="+policy+"&ndate="+new Date();
		var retObj = window.showModalDialog(url,window ,feacture);
		if(retObj){
			var requestCaller = new XMLHttpRequestCaller(this, "ajaxEdocSummaryManager", "deleteUpdateObj",false);
			requestCaller.addParameter(1, "String", summaryId);  
			requestCaller.serviceRequest();
			<%-- dIdentifier(); //给督办人ID加标识 0|1|2 --%>
			 if(permKey=="fengfa"){
			     if(contentIframe.checkEdocWordNo()==false)	       {
			        return;
			     }
			     if(checkExchangeRole()==false){
			         return;
			     }
			}  
			if(signFlag=="false") {
					if(!confirm("<fmt:message key='edoc.docTemplate.signAlert' />?")) {
						return;
					}
				}
		    doSign(subForm,formAction);
		}
	}else{
		//yangzd 在多人执行时，删除当前编辑人的编辑信息
		var requestCaller = new XMLHttpRequestCaller(this, "ajaxEdocSummaryManager", "deleteUpdateObj",false);
		requestCaller.addParameter(1, "String", summaryId);  
		requestCaller.serviceRequest();
		<%-- dIdentifier(); //给督办人ID加标识 0|1|2 --%>
		//修改 当前处理节点有 交换类型权限时，和封发一样要提示 请指定部门收发员
		 if(permKey=="fengfa" || ${v3x:containInCollection(baseActions, 'EdocExchangeType')}){
		     if(contentIframe.checkEdocWordNo()==false)	       {
		        return;
		     }
		     if(checkExchangeRole()==false){
		         return;
		     }
		     if(signFlag=="false") {
					if(!confirm("<fmt:message key='edoc.docTemplate.signAlert' />?")) {
						return;
					}
				}
		}  
	    doSign(subForm,formAction);
    }
	//lijl添加,状态是是3或者4并且是退回过的情况下弹出窗口-----------------------End
	//lijl注销----------------------------------------------------------------Start
	//yangzd 在多人执行时，删除当前编辑人的编辑信息
	//var requestCaller = new XMLHttpRequestCaller(this, "ajaxEdocSummaryManager", "deleteUpdateObj",false);
	//requestCaller.addParameter(1, "String", summaryId);  
	//requestCaller.serviceRequest();
	<%-- dIdentifier(); //给督办人ID加标识 0|1|2 --%>
	 //if(permKey=="fengfa"){
	 //    if(contentIframe.checkEdocWordNo()==false)	       {
	 //       return;
	 //    }
	 //    if(checkExchangeRole()==false){
	 //        return;
	 //    }
	//}  
    //doSign(subForm,formAction);
    ////lijl注销----------------------------------------------------------------End
}
function showMemberList(){
	var memberListDiv = document.getElementById("selectMemberList");
	memberListDiv.style.display = "";
}
function hideMemberList(){
	var memberListDiv = document.getElementById("selectMemberList");
	memberListDiv.style.display = "none";
}
function addIdentifier(){
	var orgMemberId = document.getElementById("orgSupervisorId").value;
	var memberId = document.getElementById("supervisorId").value;
	var orgArray = orgMemberId.split(",");
	var memberArray = memberId.split(",");
	var returnId = "";
	for(var i=0;i<memberArray.length;i++){
		if(orgMemberId.value == ""){
			memberArray[i] +="|0";
			returnId += memberArray[i];
			returnId +=",";
			continue;
		}

		var bool = orgMemberId.search(memberArray[i]);
		
		if(bool != "-1" || bool != -1){
			memberArray[i] += "|0";
		}else{
			memberArray[i] += "|1";
		}
		returnId += memberArray[i];
		returnId +=",";
	}

	if(orgMemberId != ''){
		for(var i=0;i<orgArray.length;i++){
			var bool = returnId.search(orgArray[i]);
			if(bool == '-1' || bool == -1){
				orgArray[i] += "|2";
				returnId += orgArray[i];
				returnId += ",";
			}
		}
	}
	document.getElementById("supervisorId").value = returnId;
}
function checkExchangeRole(){
  var typeAndIds="";
  var msgKey="edocLang.alert_set_departExchangeRole";	  
  var obj=document.getElementById("edocExchangeType_depart");
  if(obj==null){return true;}
  if(obj.checked)
  {
    typeAndIds="Department|"+sendUserDepartmentId;	    
  }
  else
  {
  	typeAndIds="Account|"+sendUserAccountId;
  	msgKey="edocLang.alert_set_accountExchangeRole";
  }
  var requestCaller = new XMLHttpRequestCaller(this, "ajaxEdocExchangeManager", "checkExchangeRole",false);
	  requestCaller.addParameter(1, "String", typeAndIds);  
  var ds = requestCaller.serviceRequest();
  if(ds=="check ok"){return true;}
  else
  {
    alert(_(msgKey,ds));
  }
  return false;
}
var timerBrighter;
function brighter(id){
    timerBrighter = window.setInterval("menuItemIn('" + id + "')", 50);
    window.clearInterval(timerDarker);
}

function menuItemIn(id){
	if(document.getElementById(id).filters.alpha.opacity < 100){
		document.getElementById(id).filters.alpha.opacity += 10;
    }else{
		window.clearInterval(timerBrighter);
    }
}

var timerDarker;
function darker(id){
	timerDarker = window.setInterval("menuItemOut('" + id + "')", 50);
	window.clearInterval(timerBrighter);
}

function menuItemOut(id){
    if(document.getElementById(id).filters.alpha.opacity > 0){
		document.getElementById(id).filters.alpha.opacity -= 10;
    }else{
		window.clearInterval(timerDarker);
		
		if(document.getElementById(id).filters.alpha.opacity <= 0) {
			document.getElementById(id).style.display = "none";
		}
    }
}

function openSuperviseWindow(summaryId){
	var mId = document.getElementById("supervisorId");
	var sDate = document.getElementById("awakeDate");
	var sNames = document.getElementById("supervisors");
	var title = document.getElementById("superviseTitle");
	var count = document.getElementById("count");
	var isDeleteSupervisior = document.getElementById("isDeleteSupervisior");

	var unCancelledVisor = document.getElementById("unCancelledVisor");
	var sfTemp = document.getElementById("sVisorsFromTemplate");
	var urlStr = superviseURL + "?method=superviseWindow";
	if(mId.value != null && mId.value != ""){
		urlStr += "&supervisorId=" + mId.value + "&supervisors=" + encodeURIComponent(sNames.value) 
		+ "&superviseTitle=" + encodeURIComponent(title.value) + "&awakeDate=" + sDate.value  + "&sVisorsFromTemplate="+sfTemp.value +"&unCancelledVisor="+unCancelledVisor.value + "&count="+count.value;
	}

    var rv = v3x.openWindow({
        url: urlStr,
        height: 300,
        width: 400
 	});
 	
	if(rv!=null && rv!="undefined"){
	   try{
    	    var affair_IdValue = document.getElementById('affair_id') ;
    	    var summary_IdValue = document.getElementById('summary_id') ;
    	    var ajaxUserId = document.getElementById('ajaxUserId') ;
    	    if(affair_IdValue && summary_IdValue && ajaxUserId ) {
    	       recordChangeWord(affair_IdValue.value ,summary_IdValue.value ,"duban" ,ajaxUserId.value)
    	    }
	   }catch(e){
	   }
		var sv = rv.split("|");
		if(sv.length == 4){
			mId.value = sv[0]; //督办人的ID(添加标识的，为的是向后台传送)
			sDate.value = sv[1]; //督办时间
			sNames.value = sv[2]; //督办人的姓名
			title.value = sv[3];
			//canModify.value = sv[4];
		}else if(sv.length == 5){
			mId.value = sv[0]; //督办人的ID(添加标识的，为的是向后台传送)
			sDate.value = sv[1]; //督办时间
			sNames.value = sv[2]; //督办人的姓名
			title.value = sv[3];
			isDeleteSupervisior.value = sv[4];//取消督办
		}
	}
}
function showDigarm(id) {
	//判断是否当前用户是否仍然是公文督办人
	if(!isStillSupervisor(summaryId)){
		if(!window.dialogArguments)
			parent.parent.location.href = parent.parent.location.href;
		else
			window.close();
		return false;
	}
	var _url = "${supervise}?method=showDigarm&superviseId="+id+"&comm=toxml&fromList=popup";
	  	var rv = v3x.openWindow({
	     		 url: _url,
	     		 width: 860,
	      	height: 690,
	      	resizable: "no"
	  	});
	  	if(rv){
		document.getElementById('monitorFrame').src = "${supervise}?method=showDigramOnly&edocId=${param.summaryId}&superviseId=${bean.id}&fromList=list";
		}
}

/**
 * 太原市政府二开  上卡功能  郝后成  2012-07-25
 */
function upCard(){
	
	$.ajax({
		   type: "POST",
		   async: false,
		   url: "/seeyon/edocForm.do?method=checkShangKa",
		   data: "",
		   success: checkcallback
	});
	
	function checkcallback(data){
		   
		   var formId = eval("(" + data + ")");
			var currentPageFormId = window.frames["contentIframe"].document.getElementById("edoctable").value;

			if(formId == "-1"){
				alert("尚未设置上卡文单，请通知单位管理员进行上卡文单设置！");
				return false;
			}else if(formId == currentPageFormId){
				alert("当前所显示文单已经是上卡后的文单！");
				return false;
			}else{
				
				var cardform_input = document.getElementById('cardform_btn');
				var cardDive = document.getElementById('cardDive');
				var cardTR = document.getElementById('cardTR');
				var formAreaDiv = window.frames["contentIframe"].document.getElementById("formAreaDiv");

					cardform_input.disabled = '';

					$('#cardDive').empty();
					cardDive.appendChild(formAreaDiv.cloneNode(true)); 
					var edocformTR = document.getElementById('edocformTR');
					var contentTR = document.getElementById('contentTR');
					var workflowTR = document.getElementById('workflowTR');
					var content1TR = document.getElementById('content1TR');
					var content2TR = document.getElementById('content2TR');
					if(edocformTR.style.display == ''){
						cardTR.style.display = 'none';
						contentTR.style.display = 'none';
						workflowTR.style.display = 'none';
						formAreaDiv.style.display = 'none';
					}
					else if(cardTR.style.display == ''){
						edocformTR.style.display = 'none';
						contentTR.style.display = 'none';
						workflowTR.style.display = 'none';
					}
					else if(workflowTR.style.display == ''){
						edocformTR.style.display = 'none';
						contentTR.style.display = 'none';
						cardTR.style.display = 'none';
						formAreaDiv.style.display = 'none';
					}
				
				$.post("/seeyon/edocForm.do?method=doShangKa","strEdocId=" + summaryId,callback);
				function callback(retData){
					var xmlObj = window.frames["contentIframe"].document.getElementById("xml");
					var edocTopicFormIdInput = window.frames["contentIframe"].document.getElementById("edoctable");
					var formIdInput = document.getElementById("formId");
					
					var returnValue = xmlHandle(retData);
					
					//yangzd 转移数据中的特殊字符
				    var temp = new String(returnValue.get("xml"));
				    temp = temp.replace(/&amp;/gi,"&");
				    temp = temp.replace(/<br>/gi,"");
				    temp = temp.replace(/&#039;/gi,"\'");
				    temp = temp.replace(/&#034;/gi,"\"");
				    temp = temp.replace(/&apos;/gi,"\'");
				    xmlObj.value = temp;
					var xlsObj = window.frames["contentIframe"].document.getElementById("xslt");
					xlsObj.value = returnValue.get("xslt");
					
					window.frames["contentIframe"].edocFormDisplayForShangKa();
					formAreaDiv.style.display = '';
					edocTopicFormIdInput.value = returnValue.get("edocFormId");
					formIdInput.value = returnValue.get("edocFormId");
					
					contentIframe.isUpdateEdocForm = true; //公文单是否修改标志 置为true
					
					document.getElementById("shangkaButton").disabled = true; //点击一次置灰
				}
				
				return true;
			}
				
	}
	
}


function showPrecessAreaTd(type){
	var edocformTR = document.getElementById('edocformTR');
	var contentTR = document.getElementById('contentTR');
	var workflowTR = document.getElementById('workflowTR');
	var content1TR = document.getElementById('content1TR');
	var content2TR = document.getElementById('content2TR');
	var cardTR = document.getElementById('cardTR');
	
	var edocform_input = document.getElementById('edocform_btn');
	var content_input = document.getElementById('content_btn');
	var workflow_input = document.getElementById('workflow_btn');
	var content1_input = document.getElementById('content1_btn');
	var content2_input = document.getElementById('content2_btn');
	var cardform_input = document.getElementById('cardform_btn');

	var hasBody1_flag = "${hasBody1}";
	var hasBody2_flag = "${hasBody2}";
	
		function initSet(){
			if(contentTR)contentTR.style.display = 'none';
			if(content1TR)content1TR.style.display = 'none';
			if(content2TR)content2TR.style.display = 'none';

			if(edocform_input)edocform_input.className = 'deal_btn_l';
			if(workflow_input)workflow_input.className = 'deal_btn_m';
			if(cardform_input)cardform_input.className = 'deal_btn_m';
			if(hasBody1_flag == 'true' || hasBody2_flag == 'true'){
				if(content_input)content_input.className = 'deal_btn_m';
			}else{
				if(content_input)content_input.className = 'deal_btn_r';
			}
			if(content1_input)content1_input.className = 'deal_btn_r';
			if(content2_input)content2_input.className = 'deal_btn_r';
			if(onlySeeContent == "false"){
				if(content_input)content_input.className = 'deal_btn_m';
				if(content1_input)content1_input.className = 'deal_btn_m';
				if(content2_input)content2_input.className = 'deal_btn_m';
				if(workflow_input)workflow_input.className = 'deal_btn_r';
			}
			
		}
		
		var bodyType = document.getElementById("bodyType").value;
		if((type == "content" || type == "content1" || type == "content2") && bodyType != "HTML"){
			//当前点击正文按钮，并且是非HTML正文时，按钮样式不变化
		}
		else{
			initSet();
		}
		
		if(type == 'edocform'){
			if(edocformTR)edocformTR.style.display = '';
			if(workflowTR)workflowTR.style.display = 'none';
			if(cardTR)cardTR.style.display = 'none';
			if(edocform_input)edocform_input.className = 'deal_btn_l_sel';
		}
		else if(type == 'workflow'){
			if(edocformTR)edocformTR.style.display = 'none';
			if(workflowTR)workflowTR.style.display = '';
			if(cardTR)cardTR.style.display = 'none';
			workflow_input.className = 'deal_btn_r_sel';
		}
		else if(type == 'cardform'){
			if(edocformTR)edocformTR.style.display = 'none';
			if(workflowTR)workflowTR.style.display = 'none';
			if(workflowTR)workflowTR.style.display = 'none';
			if(cardTR)cardTR.style.display = '';
			cardform_input.className = 'deal_btn_m_sel';
		}
		else if(type == 'content'){
			if(contentTR && bodyType == "HTML"){
				if(edocformTR)edocformTR.style.display = 'none';
				if(workflowTR)workflowTR.style.display = 'none';
				if(cardTR)cardTR.style.display = 'none';
				contentTR.style.display = '';
				content_input.className = 'deal_btn_m_sel';
			}
			else{
				LazyloadOffice('0');
			}
		}
		else if(type == 'content1'){
			if(contentTR && bodyType == "HTML"){
				if(edocformTR)edocformTR.style.display = 'none';
				if(workflowTR)workflowTR.style.display = 'none';
				if(cardTR)cardTR.style.display = 'none';
				content1TR.style.display = '';
				content_input.className = 'deal_btn_m_sel';
			}
			else{
				LazyloadOffice('1');
			}
		}
		else if(type == 'content2'){
			if(contentTR && bodyType == "HTML"){
				if(edocformTR)edocformTR.style.display = 'none';
				if(workflowTR)workflowTR.style.display = 'none';
				if(cardTR)cardTR.style.display = 'none';
				content2TR.style.display = '';
				content_input.className = 'deal_btn_m_sel';
			}
			else{
				LazyloadOffice('2');
			}
		}
}

//跟踪相关
function setTrackRadiio(v){
	var obj = document.getElementById("isTrack");
	if(obj!=null){
		var all = document.getElementById("trackRange_all");
		var part = document.getElementById("trackRange_part");
		if(obj.checked){
			 all.disabled = false;
			 part.disabled = false;
			 all.checked = true;
		}else {
			all.disabled = true;
			part.disabled = true;
			all.checked = false;
			part.checked = false;
		}
	}
	checkMulitSign(v);
}

function setTrackCheckboxChecked(){
	var obj = document.getElementById("isTrack");
	if(obj!=null){
		obj.checked = true;
	}
}
function selectPeopleFunTrackNewCol(){
	setTrackCheckboxChecked();
	selectPeopleFun_track();
}
function setPeople(elements){
	var memeberIds = "";
	if(elements){
		for(var i= 0 ;i<elements.length ; i++){
			if(memeberIds ==""){
				memeberIds = elements[i].id;
			}else{
				memeberIds +=","+elements[i].id;
			}
		}
		document.getElementById("trackMembers").value = memeberIds;
	}
}


//修改人：杨帆 2012-2-15———定义显示意见处理输入栏和常用语等变量 --start
var canShowOpinion="${v3x:containInCollection(baseActions, 'Opinion')}";  //允许显示处理意见
var canShowCommonPhrase="${v3x:containInCollection(baseActions, 'CommonPhrase')}"; //允许显示常用语
var canWordNoChange="${v3x:containInCollection(advancedActions, 'WordNoChange') or v3x:containInCollection(commonActions, 'WordNoChange')}"; //允许修改文号
var canUpdateForm="${v3x:containInCollection(advancedActions, 'UpdateForm') or v3x:containInCollection(commonActions, 'UpdateForm')}";   //允许修改表单
var canEditBody="${v3x:containInCollection(advancedActions, 'Edit') or v3x:containInCollection(commonActions, 'Edit')}";     //允许修改正文
var canUploadRel="${v3x:containInCollection(baseActions, 'UploadRelDoc')}";//允许关联文档
var canUploadAttachment="${v3x:containInCollection(baseActions, 'UploadAttachment')}";//可以上传附件
var canShowAttitude="${attitudes != 3}"; //是否显示态度

//点击确认或者暂存待办前，把文单中意见处理框的值传递到此页面
function beforeSubmitButton(){
  //意见态度
  var childrenPageAttitude = contentIframe.document.getElementsByName("attitude");
  if(childrenPageAttitude){
      for(var i=0;i<childrenPageAttitude.length;i++){
         if(childrenPageAttitude[i].checked==true){
        	 document.getElementsByName("attitude")[i].checked=true;
         }
      }
  }

  //意见处理
  if(contentIframe.document.getElementById("contentOP")){
    theform.contentOP.value=contentIframe.document.getElementById("contentOP").value;
  }
}

//修改人：杨帆 2012-2-15———定义显示意见处理输入栏和常用语等变量 --end

//-->
$(document).ready(function(){
  $("#showAdvanceViews").click(function(){
     $("#showAdvanceViews span").toggle(); 
  })
  //判断是否可以直接修改文单
  if(${param.from=='Pending'} &&canUpdateForm=="true"){
    contentIframe.UpdateEdocForm('${param.summaryId}');
  }
  //显示意见框到文单中
  if(${param.from=='Pending'} && (canShowOpinion=="true"|| canShowAttitude=="true" )){
	  contentIframe.showOpinionsInputForm();
  }
}); 
</script>
<style type="text/css">
.edocbarmargin{color: #ffffff;}
.edocbarmargin a{color: #ffffff;}
.layout-split-east{
	border-left:1px solid #cccccc;
	padding-left: 4px;
	background:url("<c:url value='/common/images/deal/split.gif' />") left center no-repeat #cccccc;
}
#showAdvanceViews span{display:inline-block;margin:0 4px -3px 0;}
#htmlContentDiv{
height:0px;
}
</style>
</head>
<body id="easyui-layout"  class="easyui-layout" scroll="no" onLoad="init_edocSUmmary()" onUnload="unLoad('${summary.processId}', '${param.summaryId}','${currentUserId}')">
	<!-- lijl添加,显示意见状态 -->
	<input type="hidden" name="optionType"   id="optionType" value="${optionType}">
	<input type="hidden" name="optionId"   id="optionId" value="${optionId}">
	<input type="hidden" name="affairState"   id="affairState" value="${affairState}">
	<input type="hidden" name="affState"   id="affairState" value="${affair.subState}">
	<div region="center" id="center_reagin" border="false" style="overflow: hidden;">
		<c:if test="${param.from eq 'sended'}"> <%--已发修改附件提交 --%>
		    <form id ="attchmentForm">
				<div id="attachmentInputs"></div>
			</form>
		</c:if>

		<v3x:attachmentDefine attachments="${attachments}" />

		<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" align="center" class="CollTable">
<%--待办操作 --%>

<c:if test="${param.from eq 'Pending'}">
<form id="theform" name="theform" action="<html:link renderURL='/edocController.do?method=finishWorkItem' />" method="post" style='margin: 0px' onSubmit="return false">
			<tr>
				<td height="36px" class="detail-summary" valign="top">

                 <%--原标题栏 --%>
                  <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="deal_toobar_m" style="border: 1px #ffffff solid;border-left: 0px;border-right: 0px;">

										<tr>
											<td style="padding: 3px 0px 0px 0px;">
                                            <div style=" float:left;" id="edoc_deal_deal">
										<!-- 提交 -->
										<a id="processButton" class="like-a div-float padding5 deal_block" href="javascript:beforeSubmitButton();edocSubmitForm(theform,'${param.summaryId}')">
							            	<span class="insertPeople"></span>
							           		<fmt:message key="common.button.submit.label" bundle="${v3xCommonI18N}" />
							            </a>
							            <!-- 暂存待办 -->
							            <c:if test="${v3x:containInCollection(baseActions, 'Comment')}">
								            <a id="zcdbButton" class="like-a div-float padding5 deal_block" href="javascript:beforeSubmitButton();doZcdb(this,'${param.summaryId}')">
								            	<span class="insertPeople"></span>
								           		<fmt:message key="zancundaiban.label" />
								            </a>
										</c:if>
										
										<c:if test="${v3x:containInCollection(baseActions, 'exchangeCard') || v3x:containInCollection(commonActions, 'exchangeCard')}">
											 <a id="shangkaButton" class="like-a div-float padding5 deal_block" href="javascript:upCard()">
								            	<span class="insertPeople"></span>
								           		上卡
								            </a>
								        </c:if>

								        <c:if test="${v3x:containInCollection(baseActions, 'Return') || v3x:containInCollection(commonActions, 'Return')}">
											<a class="like-a div-float padding5 deal_block" id="stepBackSpan" href="javascript:stepBack(document.theform)">
								            <span class="dealicons stepBack"></span>
								            <fmt:message key="menu.edocNew.return"/>
								            </a>
								        </c:if>
										<c:if test="${v3x:containInCollection(baseActions, 'Terminate') || v3x:containInCollection(commonActions, 'Terminate')}">
											<a class="like-a div-float padding5 deal_block" id="stepStopSpan" href="javascript:stepStop(document.theform)">
									        <span class="dealicons stepStop"></span>
									        <fmt:message key="stepStop.label" bundle="${colI18N}"/>
									        </a>
										</c:if>

												&nbsp;
                                                </div>
                                                <div style="float:left;">
                                                <%--公文交换--%>			
													<c:if test="${v3x:containInCollection(baseActions, 'EdocExchangeType')}">
														<div class="metadataItemDiv">
														<label for="edocExchangeType_depart">
														                <input type="radio" name="edocExchangeType" id="edocExchangeType_depart"  onclick="hideMemberList()" value="<%=Constants.C_iExchangeType_Dept%>" <%=(EdocSwitchHelper.getDefaultExchangeType()==Constants.C_iExchangeType_Dept?"checked":"")%>><fmt:message
														                    key="edoc.exchangetype.department.label"/>
														</label>
														<label for="edocExchangeType_company">
														                <input type="radio" name="edocExchangeType" id="edocExchangeType_company" onClick="showMemberList()" value="<%=Constants.C_iExchangeType_Org%>" <%=(EdocSwitchHelper.getDefaultExchangeType()==Constants.C_iExchangeType_Org?"checked":"")%>><fmt:message
														                    key="edoc.exchangetype.company.label"/>
														</label>
														</div>
														<div class="metadataItemDiv">
														<div id="selectMemberList" style="display:none;">
															<select name="memberList" class="condition" style="width: 115px">
																<option value=""><fmt:message key="select.label.unitEdocOper"/></option>
																<c:forEach items="${memberList}" var="member">
																 	<option value="${member.user.id}">${v3x:toHTML(member.user.name)}</option>
																</c:forEach>
															</select>
														</div>
														</div>
													</c:if>	
                                                </div>
                                                 <div style="border-left:1px solid #d1d1d1;float:left;">
                                            <div style="border-left:1px solid #fff; padding-left:6px;">
												<c:set var="hasAdvanceButton" value="no"/>
										    	<iframe id="processAdvanceDivIframe" scrolling="no" frameborder="0" style="position:absolute; right:2px; top:65; width:100px;height:10px; z-index:2; background-color:#ffffff;border:1px #C5C5C5 solid;display:none;z-index: 10"></iframe>
										       	<div style="position:absolute; width:100px; z-index:2; background-color:#ffffff;border:1px #C5C5C5 solid;display:none;z-index: 11" 
				      									id="processAdvanceDIV" onMouseOver="advanceViews(true)" onMouseOut="advanceViews(false)" oncontextmenu="return false">
												<c:forEach items="${totalActions}" var="aoperation" begin="${adButtonCount>0?adButtonCount:7}">
												
													<c:choose>
													<%--加签 --%>
														<c:when test="${'AddNode' eq aoperation }">
														<div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
												            <div class=" advanceICON">
												                    <c:set var="hasAdvanceButton" value="yes"/>                    
												                    <a href="javascript:edocPreInsertPeople('${param.summaryId}','${summary.processId}','${param.affairId}','${summary.edocType}','false')">
												                            <span class="dealicons-advance insertPeople"></span>
												                            <fmt:message key="insertPeople.label"/></a>
												            </div>
												        </div>
														</c:when>
														
														<c:when test="${'SuperviseSet' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
															<div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
															<div class=" advanceICON">		
																	<c:set var="hasAdvanceButton" value="yes"/>
																	<a href="javascript:openSuperviseWindow('${param.summaryId}')">
												                    <span class="dealicons-advance supervise"></span>
												                    <fmt:message key="col.supervise.operation.label" bundle="${colI18N}"/></a>
															</div>
															</div>
														</c:when>
														<%-- 
														 <c:when test="${'UpdateForm' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
												            <div style="clear:both"></div>
												            <div class=" advanceICON">
												                    <c:set var="hasAdvanceButton" value="yes"/>
												                    <a href="javascript:contentIframe.UpdateEdocForm('${param.summaryId}')">
												                            <span class="dealicons-advance updateform"></span>
												                            <fmt:message key="node.policy.updateform.label"/></a>
												            </div>
											            </c:when>--%>
											            <c:when test="${'Edit' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>                    
											                    <a href="javascript:updateContent('${param.summaryId}')">
											                            <span class="dealicons-advance editContent"></span>
											                            <fmt:message key="editContent.label"/></a>
											            </div>
											            </div>
											            </c:when>
											            
											            
											        	<%--  修改附件--%>
											        	<c:when test="${'allowUpdateAttachment' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
														<div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
														<div class=" advanceICON">
											        		 	<c:set var="hasAdvanceButton" value="yes"/>
											            	 	<a href="javascript:updateAtt('${param.summaryId}','${summary.processId}')">
											                             <span class="dealicons-advance updateAttachment"></span>
											                            <fmt:message key="edoc.allowUpdateAttachment" bundle="${colI18N}"/></a>
											            </div>
											            </div>
											        	</c:when>
											        	
											        	
											            <c:when test="${'RemoveNode' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:preDeletePeople('${param.summaryId}','${summary.processId}','${param.affairId}')">
											                             <span class="dealicons-advance deletePeople"></span>
											                             <fmt:message key="deletePeople.label"/></a>
											            </div>
											            </div>
											            </c:when>
											        	 <%--
											            <c:if test="${v3x:containInCollection(advancedActions, 'Modify')}">
												        <div class="div-float processAdvanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <img src="<c:url value='/apps_res/collaboration/images/commonPhrase.gif' />" border="0"
											                            align="absmiddle" with="16"><br><fmt:message key="modify.label" bundle="${colI18N}"/>
											            </div>  
											            </c:if>
											            <c:if test="${v3x:containInCollection(advancedActions, 'ApproveSubmit')}">
											            <div class="div-float processAdvanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <img src="<c:url value='/apps_res/collaboration/images/commonPhrase.gif' />" border="0"
											                            align="absmiddle" with="16"><br><fmt:message key="approveSubmit.label" bundle="${colI18N}"/>
											            </div>
											            </c:if>
											            --%>            
											            <c:when test="${'Forward' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:transmitSend('${param.summaryId}','${param.affairId}');">
											                             <span class="dealicons-advance transmit"></span>
											                            <fmt:message key='common.toolbar.transmit.label' />
											                    </a>
											            </div>
											            </div>
											            </c:when>
											            
											             
											            <c:when test="${'WordNoChange' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                 <c:set var="hasAdvanceButton" value="yes"/>
											                   <a href="javascript:contentIframe.WordNoChange()">
											                            <span class="dealicons-advance wordNoChange"></span>
											                            <fmt:message key="wordNoChange.label" bundle="${colI18N}"/>
											                  </a>
											            </div>
											            </div>
											            </c:when>
											            <c:when test="${'EdocTemplate' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                 <c:set var="hasAdvanceButton" value="yes"/>
											                   <a href="javascript:taohong('edoc')">
											                            <span class="dealicons-advance loadRedTemplate"></span>
											                            <fmt:message key="edoc.action.form.template" />
											                   </a>
											            </div>
											            </div>
											            </c:when>
											            
											            <c:when test="${'Return' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON" id="stepBackSpan">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:stepBack(document.theform)">
											                            <span class="dealicons-advance stepBack"></span>
											                            <fmt:message key="stepBack.label" bundle="${colI18N}"/></a>
											            </div>
											            </div>
											            </c:when>
											            <%--当前会签
											            <c:when test="${'JointSign' eq aoperation}">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:preColAssign('${param.summaryId}','${summary.processId}','${param.affairId}')">
											                            <span class="dealicons-advance colAssign"></span>
											                            <fmt:message key="colAssign.label" bundle="${colI18N}"/></a>
											            </div>
											            </c:when>
											             --%>
											            <c:when test="${'Infom' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:addInform('${param.summaryId}','${summary.processId}','${param.affairId}');">
											                            <span class="dealicons-advance addInform"></span>
											                            <fmt:message key="addInform.label" bundle="${colI18N}"/></a>
											            </div>
											            </div>
											            </c:when>
											            <%--多级会签 
											            <c:when test="${'moreSign' eq aoperation  && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:addMoreSign('${param.summaryId}','${summary.processId}','${param.affairId}');">
											                    <img  src="<c:url value='/apps_res/collaboration/images/addMoreSign.gif' />" border="0"
											                            align="absmiddle" height="14"><fmt:message key="edoc.metadata_item.moreSign" bundle="${colI18N}"/></a>
											            </div>
											            </c:when>
											            --%>
											            <%--终止
											            <c:when test="${'Terminate' eq aoperation}">
											            <div class=" advanceICON" id="stepStopSpan">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:stepStop(document.theform);">
											                            <span class="dealicons-advance stepStop"></span>
											                            <fmt:message key="stepStop.label" bundle="${colI18N}"/></a>
											            </div>
											            </c:when>
											            --%>
											            <c:when test="${'Cancel' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
																<a href="javascript:repealItem('pending','${param.summaryId}')">
															        <span class="dealicons-advance repeal"></span>
															        <fmt:message key="repeal.2.label" bundle="${colI18N}"/></a>
														</div>
														</div>
												    	</c:when>
											            
											            <c:when test="${'Sign' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:openSignature()"  title="<fmt:message key="comm.sign.introduce.label" bundle="${v3xCommonI18N}"/>">
											                            <span class="dealicons-advance signature"></span>
											                            <fmt:message key="node.policy.Sign.label" bundle="${v3xCommonI18N}"/></a>
											            </div>
											            </div>
											            </c:when>
											            <c:when test="${'DepartPigeonhole' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:DepartPigeonhole(<%=ApplicationCategoryEnum.edoc.getKey()%>,'${param.summaryId}')">
											                            <span class="dealicons-advance departpigeonhole"></span>
											                            <fmt:message key="edoc.action.DepartPigeonhole.label"/></a>
											            </div>
											            </div>
											            </c:when>
											            <c:when test="${'ScriptTemplate' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:taohong('script')">
											                            <span class="dealicons-advance scriptTemplate"></span>
											                            <fmt:message key="edoc.action.script.template" /></a>
											            </div>
											            </div>
											            </c:when>
											            <c:when test="${'PassRead' eq aoperation}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:addPassInform('${param.summaryId}','${summary.processId}','${param.affairId}');">
											                            <span class="dealicons-advance passred"></span>
											                            <fmt:message key="node.policy.chuanyue" bundle="${v3xCommonI18N}"/></a>
											            </div>
											            </div>
											            </c:when>
											            <c:when test="${'HtmlSign' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:htmlSign();">
											                            <span class="dealicons-advance htmlSign"></span>
											                            <fmt:message key="edoc.action.htmlSign.label"/></a>
											            </div>
											            </div>
											            </c:when>
											            
											            <c:when test="${'TransmitBulletin' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
											            <div class=" advanceICON">
											                    <c:set var="hasAdvanceButton" value="yes"/>
											                    <a href="javascript:TransmitBulletin('bulletionaudit','${param.summaryId}');">
											                            <span class="dealicons-advance transmitBulletin"></span>
											                            <fmt:message key="edoc.metadata_item.TransmitBulletin"  bundle="${colI18N}"  /></a>
											            </div>
											            </div>
											            </c:when>
											            
											            <c:when test="${'TanstoPDF' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											                <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
												            <div class="advanceICON">
												                    <c:set var="hasAdvanceButton" value="yes"/>
												                    <a href="javascript:convertToPdf(this.form);">
												                            <span class="dealicons-advance transmitBulletin"></span>
												                            <fmt:message key="edoc.metadata_item.TanstoPdf"  bundle="${colI18N}"  /></a>
												            </div>
												            </div>
											            </c:when>
											            
											            <c:when test="${'sendBackToDraft' eq aoperation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											            <div style="padding: 3px;" onMouseMove="javascript:this.className='more-deal-sel'" onMouseOut="javascript:this.className='more-deal'">
												            <div class="advanceICON" id="sendBackToDraftDiv">
												                    <c:set var="hasAdvanceButton" value="yes"/>
												                    <a href="javascript:sendBackToDraft(document.theform);">
												                            <span class="dealicons-advance transmitBulletin"></span>
												                            <fmt:message key="edoc.metadata_item.sendBackToDraft"  bundle="${colI18N}"  /></a>
												            </div>
												            </div>
											            </c:when>
													</c:choose>
										           
										           </c:forEach>
										           
										           <c:if test="${v3x:getBrowserFlagByRequest('OnlyIpad', pageContext.request)}">
										           <div style="clear: both; width: 100%; text-align: right;padding: 0 5px 5px 0">
										              <a href="javascript:closeAdvance()"><fmt:message key="common.button.close.label"  bundle="${v3xCommonI18N}" /></a>
										           </div>
										        	</c:if>
										        </div>
										         <div onClick="showAdvanceViews()" id="showAdvanceViews" class="cursor-hand deal_advance" style="width:100px;"><font style="color:#5A5A5A;"><span><img src="<%=request.getContextPath() %>/apps_res/edoc/images/deal_more1.gif" width="16" height="17"></span><span style="display:none;"><img src="<%=request.getContextPath() %>/apps_res/edoc/images/deal_more2.gif" width="16" height="17"></span>更多操作</font></div>
                                                 </div>
                                                 </div>
											</td>	
											<td>
													
											</td>
											<td align="left">
                                           
											</td>
										</tr>									
									</table>
				</td>
			</tr>

			<tr id="moreOperationDiv" style="display:none">
			  <td  height="36px" class="detail-summary" valign="middle">
			  <div style="float:left;">
													<!-- 接收从弹出页面提交过来的数据 -->
													<!-- 太原市政府二开  上卡功能  提交formId 郝后成  2012-07-25 -->
													<input type="hidden" name="formId" id="formId" value="">
													<input type="hidden" name="popJsonId" id="popJsonId" value="">
													<input type="hidden" name="popNodeSelected" id="popNodeSelected" value="">
													<input type="hidden" name="popNodeCondition" id="popNodeCondition" value="">
													<input type="hidden" name="popNodeNewFlow" id="popNodeNewFlow" value="">
													<input type="hidden" name="allNodes" id="allNodes" value="">
													<input type="hidden" name="nodeCount" id="nodeCount" value="">
													<div style="display:none" id="processModeSelectorContainer"></div>
													<input type="hidden" id="ajaxUserId" name="ajaxUserId" value="${currentUserId} "/>
													<input type="hidden" id="affair_id" name="affair_id" value="${param.affairId}"/>      
													<input type="hidden" id="summary_id" name="summary_id" value="${param.summaryId}"/>
													<input type="hidden" name="startMemberId" value="${summary.startMember.id}"/>
													<input type="hidden" name="appName" id="appName" value='<%=ApplicationCategoryEnum.edoc.getKey()%>'/>
													<input type="hidden" id="policy" name="policy" value="${nodePermissionPolicyKey}"/>
													<input type="hidden" id="edocType" name="edocType" value="${summary.edocType}"/>
													<input type="hidden" id="archiveId" name="archiveId" value="${summary.archiveId}">
													<input type="hidden" id="prevArchiveId" name="prevArchiveId" value="${summary.archiveId}">
													<input type="hidden" name="supervisorId" id="supervisorId" value="${supervisorId}">
													<input type="hidden" name="isDeleteSupervisior" id="isDeleteSupervisior" value="false">
													<input type="hidden" name="orgSupervisorId" id="orgSupervisorId" value="${supervisorId}">
													<input type="hidden" name="supervisors" id="supervisors" value="${supervisors}">
													<input type="hidden" name="unCancelledVisor" id="unCancelledVisor" value="${unCancelledVisor }">
													<input type="hidden" name="sVisorsFromTemplate" id="sVisorsFromTemplate" value="${sVisorsFromTemplate}">
													<input type="hidden" name="awakeDate" id="awakeDate" value="${awakeDate}">
													<input type="hidden" name="superviseTitle" id="superviseTitle" value="${superviseTitle}">
													<input type="hidden" name="processId" id="processId" value="${summary.processId}">
													<input type="hidden" name="caseId" id="caseId" value="${summary.caseId }">
													<input type="hidden" name="count" id="count" value="${count}"/>
													<input type="hidden" name="disPosition" id="disPosition" value="${disPosition}"/>
													<%--记录是否进行了文单套红，主要用来记录JS记录日志--%>
													<input type="hidden" name="redForm" id="redForm" value="false">
													<%--记录是否进行了正文套红，主要用来记录JS记录日志--%>
													<input type="hidden" name="redContent" id="redContent" value="false"/>
													<input type="hidden" id="currentLoginAccountId" name="currentLoginAccountId" value="${v3x:currentUser().loginAccount}">
													<input type="hidden" id="pushMessageMemberIds" name="pushMessageMemberIds" value="">
													<%--office --%>
													<input type="hidden" name="currContentNum" id="currContentNum" value="0">
													<input type="hidden" name="isUniteSend" id="isUniteSend" value="${summary.isunit}">
													<input type="hidden" name="orgAccountId" value="${summary.orgAccountId}">
													<%--PDF--%>
													<INPUT type="hidden"  NAME="isConvertPdf"   id="isConvertPdf" value="" />
													<%--WORD转PDF的时候，生成的PDF正文的ID--%>
													<input type="hidden" name="newPdfIdFirst" id="newPdfIdFirst" value="${newPdfIdFirst}"/>
													<input type="hidden" name="newPdfIdSecond" id="newPdfIdSecond" value="${newPdfIdSecond}"/>
													
													<input type="hidden" id="process_xml" name="process_xml" value=""/>
													<input type="hidden" name="process_desc_by" id="process_desc_by" value="xml" />
													<input type="hidden" name="currentNodeId" value="${currentNodeId }" />
													<!-- 将isMatch缺省值为true，判断是否最后一个处理人在preSend中 -->
													<input type="hidden" name="isMatch" id="isMatch" value="true" />
													<!-- 暂存待办的意见ID -->
													<input type="hidden" name="oldOpinionId" value="${tempOpinion.id}" />
													<input type="hidden" name="__ActionToken" readonly value="SEEYON_A8" > <%-- post提交的标示，先写死，后续动态 --%>
													
													<input type="hidden" name="bodyType" id="bodyType" value="${summary.firstBody.contentType}">
													<!-- 暂存待办提醒时间-->
													<input type="hidden" name="zcdbTime" id="zcdbTime" value="<fmt:formatDate value='${zcdbTime}' pattern='yyyy-MM-dd HH:mm'/>">
													
													<script type="text/javascript">
														document.getElementById("process_xml").value = caseProcessXML;
													</script>
													
													<v3x:selectPeople id="wf" panels="Department,Team" selectType="Department,Team,Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="selectInsertPeople(elements)" viewPage="selectNode4Workflow"/>
													<script type="text/javascript">var hiddenMultipleRadio_wf = true;</script>
													<v3x:selectPeople id="colAssign" panels="Department,Team,Post" selectType="Department,Team,Post,Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="selectColAssign(elements)"/>
													<v3x:selectPeople id="addInform" panels="Department,Team,Post" selectType="Department,Team,Post,Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="selectAddInform(elements)" viewPage="selectNode4Workflow"/>
												
													<v3x:selectPeople id="passRead" panels="Department,Team" selectType="Account,Department,Team,Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="selectPassRead(elements)"/>
													<v3x:selectPeople id="addMoreSign" panels="Department" selectType="Department,Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="addMoreSignResult(elements)" />
													<script>
													    var exMems = new Array();
														exMems = exMems.concat(parseElements("${v3x:parseElementsOfIds(supervisorIds, 'Member')}"));
														excludeElements_sv = exMems;
														//传阅知会，不回现选择数据
														showOriginalElement_addInform=false;
														showOriginalElement_passRead=false;
														showOriginalElement_addMoreSign=false;
														
													</script>
													<v3x:selectPeople id="sv" panels="Department" selectType="Member"
													                  departmentId="${sessionScope['com.seeyon.current_user'].departmentId}"
													                  jsFunction="sv(elements)"/>
													<script>
													onlyLoginAccount_flash=true;
													onlyLoginAccount_wf=true;
													onlyLoginAccount_colAssign=true;
													onlyLoginAccount_sv=true;
													var unallowedSelectEmptyGroup_colAssign = true;
													var unallowedSelectEmptyGroup_addInform = true;
													var hiddenFlowTypeRadio_addInform = true;
													var hiddenRootAccount_addInform = true;
													</script>
													<input type="hidden" name="affairId" value="${param.affairId}"/>
													<span id="selectPeoplePanel"></span>
													
													<div oncontextmenu="return false" style="position:absolute; right:20px; top:120px; width:260px; height:60px; z-index:2; background-color: #ffffff;display:none;overflow:no;border:1px solid #000000;" id="divPhrase" onmouseover="showPhrase()" onmouseout="hiddenPhrase()" oncontextmenu="return false">
													    <IFRAME width="100%" id="phraseFrame" name="phraseFrame" height="100%" frameborder="0" align="middle" scrolling="no" marginheight="0" marginwidth="0"></IFRAME>
													</div>
													<%--意见框 --%>
													<c:if test="${v3x:containInCollection(baseActions, 'Opinion')}">
													<input type="hidden" id="opinionPolicy" name="opinionPolicy" value="${opinionPolicy}" />
													<textarea id="contentOP" name="contentOP" style="display:none;" validate="maxLength" inputName="<fmt:message key='common.opinion.label' bundle='${v3xCommonI18N}' />" maxSize="2000">${empty tempOpinion.content?"":fn:trim(tempOpinion.content)}</textarea>
													</c:if>
													<%--态度--%>
													<c:if test="${attitudes != 3}">
											         <div id="processAttitude" style="display:none">
											        	<c:set var="enclude" value="${attitudes==2?'1':'' }"/>
											        	<c:set var="select" value="${attitudes==2?'2':'1' }"/>
											            <v3x:metadataItem metadata="${colMetadata['collaboration_attitude']}" showType="radio" name="attitude" selected="${draftOpinion == null ? select : draftOpinion.attitude}" enclude="${enclude }"/>
												     </div>
													</c:if>
													

													<%--消息推送 --%>
				                                    <a href="#" onClick="showPushWindow('${param.summaryId}');">
				                                    <img src="<c:url value='apps_res/v3xmain/images/online.gif' />" border="0" align="absmiddle"/>&nbsp;
				                                    <fmt:message key="message.push.label" bundle="${colI18N}"/></a>
                    
				                                    <%--跟踪 --%>
													<c:if test="${v3x:containInCollection(baseActions, 'Track') && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
														<label for="isTrack">
													   		<input type="checkbox" name="afterSign" value="track" onClick="setTrackRadiio(this);"id="isTrack" ${v3x:outConditionExpression(affair.isTrack, 'checked', '')} ><fmt:message key="track.label" />:
													   		<label for="trackRange_all">
																<input type="radio" name="trackRange" id="trackRange_all" disabled onClick="setTrackCheckboxChecked();" value="1" ${affair.isTrack&&empty trackIds?'checked':''}/><fmt:message key="col.track.all" bundle="${v3xCommonI18N}" />
															</label>
															<label for="trackRange_part">
																<c:set value="${v3x:parseElementsOfIds(trackIds, 'Member')}" var="mids"/>
																<input type="hidden" value="${trackIds}" name="trackMembers" id="trackMembers"/>
																<v3x:selectPeople id="track" panels="Department,Team,Post,Outworker,RelatePeople" selectType="Member" jsFunction="setPeople(elements)" originalElements="${mids}"/>	
																<input type="radio" name="trackRange"  id="trackRange_part" disabled onClick="selectPeopleFunTrackNewCol()" value="0" ${not empty trackIds?'checked':''}/><fmt:message key="col.track.part" bundle="${v3xCommonI18N}" />
															</label>
													   	</label>
													</c:if>
													
													<%--归档 --%>
													<c:if test="${v3x:containInCollection(baseActions, 'Archive')}">
													   	  <c:if test="${v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
													       <label for="pipeonhole">
													           <input type="checkbox" name="afterSign" id="pipeonhole" value="pipeonhole" onclick="checkMulitSign(this)" 
													           	${nodePermissionPolicyKey eq 'fengfa'?'checked':''}
													           	<c:if test="${!canArchive}">disabled</c:if>/>
													           	<fmt:message key="sign.after.pipeonhole.label"/>
													           	&nbsp;&nbsp;&nbsp;&nbsp;
													       </label>
													       </c:if>
													       <%--封发 并且设置了预归档路径--%>
													       <c:set var="isShowPrepigenholePath" value="${nodePermissionPolicyKey eq 'fengfa' and summary.archiveId ne null and isPresPigeonholeFolderExsit}"/>
													       <c:set var="archiveIdIsNull" value="${summary.archiveId eq null }"/>
													       <c:set var="presPigeonholeFolderNotExsit" value="${summary.archiveId ne null and not isPresPigeonholeFolderExsit}"/>
													       <c:set var="isShowSelectpigenholePath" value="${nodePermissionPolicyKey eq 'fengfa' and (archiveIdIsNull or presPigeonholeFolderNotExsit ) }"/>
													      
													       <%--设置了预先归档。则直接显示 --%>
													       <span id="showPrePigeonhole" style="display:${isShowPrepigenholePath?'':'none'}">
													      		<fmt:message key="pigeonhole.label.to" /> : &nbsp;${archiveFullName}
													       </span>
													       <%--没有设置预归档，需要手动选择 --%>
													       <span id="showSelectPigeonholePath" style="display:${isShowSelectpigenholePath?'':'none'}">
													        	<fmt:message key="pigeonhole.label.to" /> : &nbsp;
													        	<select id="selectPigeonholePath" style="width:100px;" onChange="pigeonholeEvent(this,'<%=ApplicationCategoryEnum.edoc.key()%>','finishWorkItem',this.form)">
													  	<option id="defaultOption" value="1"><fmt:message key="common.default" bundle="${v3xCommonI18N}"/></option>   
													  	<option id="modifyOption" value="2">${v3x:_(pageContext, 'click.choice')}</option>
													  	<c:if test="${hasPrePighole}" >
													  		<option value="3" selected>${archiveName}</option>
													  	</c:if>
															</select>
													       </span>
													</c:if>
													
													<%--意见附件和关联文档--%>	
													<c:set var="canUploadRel" value="${v3x:containInCollection(baseActions, 'UploadRelDoc')}"/>
													<c:set var="canUploadAttachment" value="${v3x:containInCollection(baseActions, 'UploadAttachment')}"/>
													<div id="attachmentEditInputs"></div>
													<div id="attachmentInputs"></div>
													<div id="contentIframeAttachmentInputs"></div>
													<div id="processatt1" style="display:none">
												   		<div id="attachment2Area"></div>
												   		<v3x:fileUpload attachments="${attachmentsOpinion}" canDeleteOriginalAtts="true" originalAttsNeedClone="false" />
													</div> 
						</div>  
						<div style="float:left;">						
						<%--隐藏按钮区 --%>
						<c:forEach items="${totalActions}" var="operation"   end="${adButtonCount>0?(adButtonCount-1):6}">
											        <c:if test="${'AddNode' eq operation}">
														<a class="like-a div-float padding5 deal_block" href="javascript:edocPreInsertPeople('${param.summaryId}','${summary.processId}','${param.affairId}','${summary.edocType}','false')">
											            <span class="dealicons insertPeople"></span>
											            <fmt:message key="insertPeople.label" bundle="${colI18N}"/>
											            </a>
											        </c:if>
											        <%-- 当前会签
											        <c:if test="${'JointSign' eq operation}">
														<a class="like-a div-float padding5 deal_block" href="javascript:preColAssign('${param.summaryId}','${summary.processId}','${param.affairId}')">
											            <span class="dealicons colAssign"></span>
											            <fmt:message key="colAssign.label" bundle="${colI18N}"/>
											            </a>
											        </c:if> --%>
											        <%-- 当前会签
											        <c:if test="${'Return' eq operation}">
														<a class="like-a div-float padding5 deal_block" id="stepBackSpan" href="javascript:stepBack(document.theform)">
											            <span class="dealicons stepBack"></span>
											            <fmt:message key="menu.edocNew.return"/>
											            </a>
											        </c:if>--%>
											        <c:if test="${'RemoveNode' eq operation}">
														<a class="like-a div-float padding5 deal_block" href="javascript:preDeletePeople('${param.summaryId}','${summary.processId}','${param.affairId}')">
											            <span class="dealicons deletePeople"></span>
											            <fmt:message key="deletePeople.label" bundle="${colI18N}"/>
											            </a>
											        </c:if>
											        <%-- 修改正文--%>
											        <c:if test="${'Edit' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											        	<a class="like-a div-float padding5 deal_block" href="javascript:updateContent('${param.summaryId}')">
											            <span class="dealicons editContent"></span>
											            <fmt:message key="editContent.label" bundle="${colI18N}"/>
											            </a>
											        </c:if>
											        <%--  修改附件--%>
											        <c:if test="${'allowUpdateAttachment' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											        	<a class="like-a div-float padding5 deal_block" href="javascript:updateAtt('${param.summaryId}','${summary.processId}')">
											            <span class="dealicons updateAttachment"></span>
											            <fmt:message key="edoc.allowUpdateAttachment" bundle="${colI18N}"/>
											            </a>
											        </c:if>
											        <c:if test="${'Infom' eq operation}">
														 <a class="like-a div-float padding5 deal_block" href="javascript:addInform('${param.summaryId}','${summary.processId}','${param.affairId}');">
											             <span class="dealicons addInform"></span>
											             <fmt:message key="addInform.label" bundle="${colI18N}"/>
											             </a>
											        </c:if>
											        <%-- 多级会签
											        <c:if test="${'moreSign' eq operation  && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
														<a class="like-a div-float padding5 deal_block" href="javascript:addMoreSign('${param.summaryId}','${summary.processId}','${param.affairId}');">
														<span class="dealicons multyAssign"></span>
											            <fmt:message key="edoc.metadata_item.moreSign" bundle="${colI18N}"/>
											            </a>
											        </c:if> --%>
											        <%--
													<c:if test="${'Terminate' eq operation}">
														<a class="like-a div-float padding5 deal_block" id="stepStopSpan" href="javascript:stepStop(document.theform)">
												        <span class="dealicons stepStop"></span>
												        <fmt:message key="stepStop.label" bundle="${colI18N}"/>
												        </a>
													</c:if>
													--%>
													<c:if test="${'Cancel' eq operation}">
														<a class="like-a div-float padding5 deal_block" href="javascript:repealItem('pending','${param.summaryId}')">
												        <span class="dealicons repeal"></span>
												        <fmt:message key="repeal.2.label"  bundle="${colI18N}"/>
												        </a>
												    </c:if> 
													<c:if test="${'Forward' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:transmitSend('${param.summaryId}','${param.affairId}');">
														         <span class="dealicons transmit"></span>
														        <fmt:message key='common.toolbar.transmit.label' bundle='${v3xCommonI18N}' />
														        </a>
													</c:if>
													
											        <c:if test="${'WordNoChange' eq operation}">
																<a class="like-a div-float padding5 deal_block" href="javascript:contentIframe.WordNoChange()">
														        <span class="dealicons wordNoChange"></span>
														        <fmt:message key="wordNoChange.label" bundle="${colI18N}"/>
														        </a>
											        </c:if>	
													<c:if test="${'ApproveSubmit' eq operation}">
														        <span class="dealicons approveSubmit"></span>
														        <fmt:message key="approveSubmit.label" bundle="${colI18N}"/>
													</c:if>
													<%--
													<c:if test="${v3x:containInCollection(commonActions, 'Modify')}">
																<img src="<c:url value='/apps_res/collaboration/images/workflowstop.gif' />" border="0" 
														        align="absmiddle" with="16">
														        <fmt:message key="modify.label" bundle="${colI18N}"/>
													</c:if>
													--%>
													<%-- 修改文单
													<c:if test="${'UpdateForm' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:contentIframe.UpdateEdocForm('${param.summaryId}')">
														        <span class="dealicons updateform"></span>
														        <fmt:message key="node.policy.updateform.label"/>
														        </a>
													</c:if>--%>
													<c:if test="${'Sign' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:openSignature()" title="<fmt:message key="comm.sign.introduce.label" bundle="${v3xCommonI18N}"/>">
														        <span class="dealicons signature"></span>
														        <fmt:message key="node.policy.Sign.label" bundle="${v3xCommonI18N}"/>
														        </a>
													</c:if>
													<c:if test="${'DepartPigeonhole' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:DepartPigeonhole(<%=ApplicationCategoryEnum.edoc.getKey()%>,'${param.summaryId}')">
														        <span class="dealicons departpigeonhole"></span>
														        <fmt:message key="edoc.action.DepartPigeonhole.label"/>
														        </a>
													</c:if>
													<c:if test="${'EdocTemplate' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											        			<a class="like-a div-float padding5 deal_block" href="javascript:taohong('edoc')">
											                    <span class="dealicons loadRedTemplate"></span>
											                    <fmt:message key="edoc.action.form.template" />
											                    </a>
											        </c:if>
													<c:if test="${'ScriptTemplate' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											        			<a class="like-a div-float padding5 deal_block" class="like-a" href="javascript:taohong('script')">
											                    <span class="dealicons scriptTemplate"></span>
											                    <fmt:message key="edoc.action.script.template" />
											                    </a>
											        </c:if>
											        <c:if test="${'PassRead' eq operation}">
											        					<a class="like-a  div-float padding5 deal_block" href="javascript:addPassInform('${param.summaryId}','${summary.processId}','${param.affairId}');">
											                            <span class="dealicons passred"></span>
											                            <fmt:message key="node.policy.chuanyue" bundle="${v3xCommonI18N}"/>
											                            </a>
											        </c:if>
											        <c:if test="${'HtmlSign' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
											        			<a class="like-a  div-float padding5 deal_block" href="javascript:htmlSign()">
											                    <span class="dealicons htmlSign"></span>
											                    <fmt:message key="edoc.action.htmlSign.label" />
											                    </a>
											        </c:if>
													<c:if test="${'SuperviseSet' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:openSuperviseWindow('${param.summaryId}')">
											                    <span class="dealicons supervise"></span>
											                    <fmt:message key="col.supervise.operation.label" bundle="${colI18N}" />
											                    </a>
													</c:if>
													<c:if test="${'TransmitBulletin' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:TransmitBulletin('bulletionaudit','${param.summaryId}')">
											                    <span class="dealicons transmitBulletin"></span>
											                    <fmt:message key="edoc.metadata_item.TransmitBulletin" bundle="${colI18N}" />
											                    </a>
													</c:if>
													<c:if test="${'TanstoPDF' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:convertToPdf()">
											                    <span class="dealicons transmitBulletin"></span>
											                    <fmt:message key="edoc.metadata_item.TanstoPdf" bundle="${colI18N}" />
											                    </a>
													</c:if>
													<c:if test="${'sendBackToDraft' eq operation && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
																<a class="like-a div-float padding5 deal_block" href="javascript:sendBackToDraft(document.theform)">
											                    <span class="dealicons transmitBulletin"></span>
											                    <fmt:message key="edoc.metadata_item.sendBackToDraft" bundle="${colI18N}" />
											                    </a>
													</c:if>
												</c:forEach>
												<%--隐藏按钮区 end--%>
												</div>
												<%--高级中没有内容时，就不显示了--%>
												<c:if test="${fn:length(totalActions)>adButtonCount }">
												<div id='processAdvance' onClick="advanceViews()" class="cursor-hand deal_advance">
												<font style="color:#5A5A5A;">&gt;&gt;</font>
												</div>
												</c:if>

			  </td>
			</tr>
			</form>
</c:if>

<%--公文附件和关联文档 --%>
<tr id="attachment2Tr" style="display: none">
<td height="16px" class="detail-summary">
					<table border="0" cellpadding="0" cellspacing="0" width="100%" align="left">
						<tr id="attachment2TrContent" style="display: none">
							<td height="18" width="70" nowrap class="bg-gray detail-subject" width="70" valign="top" align="left"><fmt:message key="common.toolbar.insert.mydocument.label" bundle="${v3xCommonI18N}" /> : </td>
							<td  valign="middle">
								<div class="div-float" id=att2Div>
									<div class="div-float font-12px" style="margin-top: 4px;">(<span id="attachment2NumberDivContent" class="font-12px"></span>)</div>
									<span id="attachmentHtml2Span">
									</span>
								</div>
							</td>
						</tr>
						<tr id="attachmentTrContent" style="display: ${canEditAtt?'':'none' }">
							<td height="18" nowrap class="bg-gray detail-subject" valign="top" width="70">
							<%--如果有权限修改就显示“插入附件”按钮，没有权限就显示"附件"--%>
								<c:if test="${canEditAtt }">
									<span id="uploadAttachmentTR" ><a href="javascript:senderEditAtt()"><fmt:message key="common.toolbar.updateAttachment.label" bundle="${v3xCommonI18N}"/></a></span>
								</c:if>
								<c:if test="${!canEditAtt }">
									<span id="normalText"><fmt:message key="common.attachment.label" bundle="${v3xCommonI18N}" /></span> 
								</c:if>
								 : 
							</td>
							<td>
								<div class=" div-float" id="attDiv" style="width:100%">
									<div class="div-float font-12px" style="margin-top: 4px;">(<span id="attachmentNumberDivContent" class="font-12px">0</span>)</div>
									<span id="attachmentHtml1Span">
									<script type="text/javascript">
									<!--
									<c:if test="${canEditAtt }">
									document.getElementById("attachmentTrContent").style.display='';
									</c:if>
									//-->
									</script>
									</span>
						
								</div>
							</td>
						</tr>
					</table>
</td>
</tr>


			<tr>
				<td height="52" class="top_div_row3_deal_bg" colspan="2">
					<table cellpadding="0" cellspacing="0" width="100%" height="100%">
						<tr>
							<td width="16" class="top_div_row3_deal_l">&nbsp;</td>
							<td valign="top">
							
								<table cellpadding="0" cellspacing="0" width="100%" height="35">
									 <tr>
									    <td valign="middle" nowrap="nowrap" class="" colspan="${'Pending' eq param.from ?'1':'2'}">    
											<c:if test="${!onlySeeContent}">
												<input id="edocform_btn" class="deal_btn_l_sel" onClick="showPrecessAreaTd('edocform')"  type="button" value="<fmt:message key='edocform.label'/>"/>
											</c:if>
											<c:if test="${summary.edocType == 2}">
												<input id="cardform_btn" class="deal_btn_m" onClick="showPrecessAreaTd('cardform')"  type="button" value="请示卡" disabled="disabled"/>
											</c:if>
											<input id="content_btn" class="deal_btn_m" onClick="showPrecessAreaTd('content')"  type="button" value="<fmt:message key='common.toolbar.content.label'  bundle='${v3xCommonI18N}'/>"/>
											
											<c:if test="${hasBody1}">
												<input id="content1_btn" class="deal_btn_m" onClick="showPrecessAreaTd('content1')" type="button" value="<fmt:message key='edoc.contentnum1.label' />"/>		
											</c:if>
											<c:if test="${hasBody2}">
												<input id="content2_btn" class="deal_btn_m" onClick="showPrecessAreaTd('content2')" type="button" value="<fmt:message key='edoc.contentnum2.label' />"/>		    
											</c:if>	
											<c:if test="${onlySeeContent=='false'}">
												<input id="workflow_btn" class="deal_btn_r" onClick="showPrecessAreaTd('workflow')" type="button" value="<fmt:message key='workflow.label'/>"/>
											</c:if>	
									     </td>
									      
										 <td align="right" nowrap="nowrap">
										 	<div align="right">
		
										 	<span style="display:block;" class="div-float-right" >
											 	
											 	<c:if test="${param.from ne 'Pending'}">
											 		<input type="hidden" name="currContentNum" id="currContentNum" value="0"/>
												</c:if>
												<%--查看原文档--%>
												<%--
												<c:if test="${isOfficeBodyType && v3x:getBrowserFlagByRequest('HideBrowsers', pageContext.request)}">
													<a href="#" onclick="dealPopupContentWin('0');">
														<font class="like-a"><fmt:message key="col.content.viewOriginalContent" bundle="${colI18N}"/></font>
													</a>
												</c:if>	
												 --%>
												<%--查看PDF文档--%>
												<c:if test="${!empty firstPDFId}">
													<span  title="pdf" onclick='contentIframe.pdfFullSize();' class="cursor-hand bodyType_Pdf margin10">&nbsp;&nbsp;</span>
												</c:if>	
						
												<c:if test="${isSupervis == true && from == 'supervise'}">
												<span title="<fmt:message key='supervise.label'  bundle='${colI18N}' />" onClick="showSupervise('${param.summaryId}');"  class="cursor-hand duban_print">&nbsp;&nbsp;&nbsp;&nbsp;</span>
												</c:if>
										   		<c:if test="${printEdocTable && v3x:getBrowserFlagByRequest('HideOperation', pageContext.request)}">
										   			<span  title="${printLabel}" onclick='colPrint()' class="cursor-hand coll_print margin10">&nbsp;&nbsp;</span>
										   		</c:if>
										   		
										      	<span title="<fmt:message key="newflow.viewDetailandDaily" bundle='${colI18N}' />" onclick="showDetailAndLog('${param.summaryId}','${summary.processId}','','${appTypeName}')"  class="cursor-hand daily_print margin10">&nbsp;&nbsp;</span>
										      	<span title="<fmt:message key="newflow.viewPropertyState"  bundle="${colI18N}" /> " onclick="showAttribute('${param.affairId}', '${param.from}')"  class="cursor-hand property_print <c:if test='${param.from eq "sended"}'>margin10</c:if>">&nbsp;&nbsp;</span>
										      	<c:if test="${param.from eq 'sended'}">
											    	<span title="<fmt:message key='common.toolbar.supervise.label' bundle='${v3xCommonI18N}' />" onclick='showSuperviseWindow()' class="cursor-hand duban_print">&nbsp;&nbsp;</span>
											    </c:if>
									 		</span>
									   		
									  </div>
									</td>  
									</tr>
								</table>
							
							</td>
							<td width="16" class="top_div_row3_deal_r">&nbsp;</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td  colspan="2">
					<table cellpadding="0" cellspacing="0" width="100%" height="100%">
						<tr>
							<td width="16" class="center_div_row3_deal_l_bg">&nbsp;</td>
							<td>
							 <div style="overflow:auto;height:100%;">
								<table cellpadding="0" cellspacing="0" width="100%" height="100%">
		
									<%--切换菜单及操作按钮开始 --%>
									<tr>
										<td valign="top">
											<table width="100%" id="signAreaTable" style="border:none;" height="100%" border="0" cellspacing="0" cellpadding="0">
												<tr id="closeTR" style="display: none" valign="top">
												    <td colspan="3">&nbsp;</td>
												</tr>
												<tr id="workflowTR" style="display: none;">
												    <td colspan="3">
												    	 <c:choose>
												    	 	<c:when test="${isSupervis == true && from == 'supervise' && finished!=true}">
														    	 <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
														    		<tr><td height="30" align="left" valign="middle" class="padding-5"><input type="button" onClick="showDigarm('${bean.id}');" value="<fmt:message key="edit.workflow.label" bundle="${colI18N}"/>"/></td></tr>
														    		<tr>
															    		<td>
															    			<div class="scrollList">
																	        <iframe src="${supervise}?method=showDigramOnly&edocId=${param.summaryId}&superviseId=${bean.id}&fromList=list" name="monitorFrame" id="monitorFrame"
																	                frameborder="0" marginheight="0" marginwidth="0" height="100%" width="100%" scrolling="auto"></iframe>
															    			</div>
															    		</td>
														    		</tr>
														    	</table>
												    	 	</c:when>
												    	 	<c:otherwise>
													        <iframe src="<html:link renderURL='/genericController.do?ViewPage=collaboration/monitor&isShowButton=${isShowButton}' />" name="monitorFrame" id="monitorFrame"
													                frameborder="0" marginheight="0" marginwidth="0" height="100%" width="100%" scrolling="auto"></iframe>
												    	 	</c:otherwise>
												    	 </c:choose>
												    </td>
												</tr>
												<tr id="edocformTR">	
													<td colspan="3">
														<!--puyc <iframe src="${detailURL}?method=getContent&summaryId=${summary.id}&affairId=${param.affairId}&from=${param.from}&openFrom=${openFrom}&lenPotent=${lenPotent}&docId=${docId}&docResId=${param.docResId}&canUploadRel=${canUploadRel}&canUploadAttachment=${canUploadAttachment}&position=${showOpinionButton?position:''}&firstPDFId=${firstPDFId}&optionType=${optionType}" width="100%" height="100%" name="contentIframe" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0"></iframe> -->
														<!-- 程炯 太原市政府项目 2012-7-20 begin -->
														<iframe src="${detailURL}?method=getContent&summaryId=${summary.id}&affairId=${param.affairId}&from=${param.from}&openFrom=${openFrom}&lenPotent=${lenPotent}&docId=${docId}&docResId=${param.docResId}&canUploadRel=${canUploadRel}&canUploadAttachment=${canUploadAttachment}&position=${showOpinionButton?position:''}&firstPDFId=${firstPDFId}&optionType=${optionType}&recType=${param.recType}&relSends=${param.relSends}&relRecs=${param.relRecs}&sendSummaryId=${param.sendSummaryId}&recEdocId=${param.recEdocId}&forwardType=${param.forwardType}&opinionType=${opinionType}" width="100%" height="100%" name="contentIframe" frameborder="0" scrolling="yes" marginheight="0" marginwidth="0"></iframe>
                                                        <!-- end -->
                                                        <input type = "hidden" name="sattitude" id="sattitude">
													</td>
												</tr>	
												<tr id="contentTR" style="display:none;">
													<td colspan="3" valign="top" align="center" id="scrollContentTd">&nbsp;
														
													</td>
												</tr>
												
												<c:if test="${summary.edocType == 2}">
													<tr id="cardTR" style="display:none;">
														<td colspan="3">
															<div id="cardDive">${cardInfo}</div>
														</td>		
													</tr>
												</c:if>
											</table>
										</td>
									 </tr>	
								</table>
							</div>
							</td>
							<td width="16" class="center_div_row3_deal_r_bg">&nbsp;</td>
						</tr>	
					</table>
				</td>
			</tr>
			<tr>
				<td height="15" class="bottom_div_row3_deal_bg"  colspan="2">
					<table cellpadding="0" cellspacing="0" width="100%" height="15">
						<tr>
							<td width="16" class="bottom_div_row3_deal_l_bg">&nbsp;</td>
							<td>&nbsp;
							
							</td>
							<td width="16" class="bottom_div_row3_deal_r_bg">&nbsp;</td>
						</tr>	
					</table>
				</td>
			</tr>
		</table>
		

		<div id="formContainer" style="display:none"></div>  
		<iframe name="showDiagramFrame" frameborder="0" height="0" width="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
		
	</div>
	
	<div class="hidden" id="ctn">
	<c:if test="${summary.edocType==0 && v3x:hasPlugin('barCode')}">
		<v3x:webBarCode  writerId="PDF417Manager"/>
	</c:if>
		<div name="edocContentDiv" id="edocContentDiv" width="0px" height="0px" style="display:${summary.firstBody.contentType eq 'HTML' ? 'block':'none'}">
			<v3x:showContent  htmlId="edoc-contentText" content="${summary.firstBody.content}" type="${summary.firstBody.contentType}" createDate="${summary.firstBody.createTime}" contentName="${summary.firstBody.contentName}" viewMode ="edit"/>
		</div>
		<input type="hidden" name="bodyContentId" value="${summary.firstBody.id}">
		<script>editType="4,0";</script>
	</div>
<script type="text/javascript">
<!--
//js最后加载

	$(document).ready(function(){
		//
		checkUpCard();
		
		if(v3x.isIpad){
			$('#easyui-layout').css({'width':1024,'height':768});
			$('body').layout().resize();
		}
		//程炯 太原市政府项目 2012-7-26 显示请示卡内容
		function checkUpCard(){
			var edocType = "${summary.edocType}";
			if(edocType == 2){
				var cardDiv = document.getElementById("cardDive");
				var cardform_input = document.getElementById("cardform_btn");

				var cardInfo = cardDiv.innerHTML;
				if(cardInfo != null && cardInfo != ''){
					cardform_input.disabled = '';
					cardDiv.style.display = '';
				}
			}
		}

		
	});
	var edocExchangeFlagObj = "${v3x:containInCollection(baseActions, 'EdocExchangeType')}";
	if(edocExchangeFlagObj=="true"){
		//封发节点和【交换类型】节点权限都显示
	if ((permKey == "fengfa")||(edocExchangeFlagObj=="true")) {
	 var companyRadioObj = document.getElementById("edocExchangeType_company");
		  if(companyRadioObj!=null && companyRadioObj.checked){
		  	showMemberList();
		  }
		}
	}

	
//-->
</script>
</body>
</html>